Overlaid WtrGate

WTRGATE.EXE is quite big (over 350kB) and with only 640kB of conventional ("low") memory you can run into problems. WaterGate requires about 450 to 500kB of free low memory or it won't even start.

While processing messages, it needs the low memory as well to store a transient message in. If the message is too big for the amount of free memory, then it will use the swapfile, but that means an overhead for swapping the message out and reading it back later on.

Some people simply don't have 450kB of free memory because they use (for example) DesqView. A special version of WtrGate was created for these users: WTRGATEO.EXE, which uses the overlay file WTRGATEO.OVR.

What is an overlay file?

Normally a program is completely loaded into memory when you run it and all code sits there and occupies memory space, whether it is used or not. The overlay version only loads code permanently that is used a lot. The rest is in the .OVR file instead of the .EXE file.

Blocks of code that are needed are loaded from the .OVR file and discarded (removed from memory) if other code has to be loaded. Multiple blocks of code can be loaded at once for efficiency and the most used blocks of code will be kept as long as possible.

Loading and discarding blocks of code costs a bit of time and disk access. WTRGATEO.EXE is 200kB smaller as the full blown executable and the rest is kept in the overlay file WTRGATEO.OVR.

Of these extra 200kB of low memory you get, 80kB is normally reserved to load bits of pieces of code into. This means that you get 125k more free low memory for storing messages or loading other programs into.

To reduce disk access, the overlay version tries to load the .OVR file into EMS memory so it can copy pieces of code from memory instead of loading it from disk all the time. So, if you have some EMS memory installed, then WtrGate/O will use that automatically. If you are using DesqView or a real OS, then you are able to set the amount of EMS a dos box gets, so you can enable the loading of the .OVR file into EMS.

Tuning parameters

If the .OVR file is used a lot (depending on your configuration), then the processing slows down a lot. WtrGate/O writes a line to the logfile when you exit the program to indicate the number of loads from the .OVR file. If this number is high (>250) then you might want to increase the 80kB low memory region that is used to load blocks of code into.

You can use -OVR25K and -OVR50K on the command line to increase the memory area a bit. This should reduce the load counter, but never to 0 though.


Back to Table of Contents or continue to the next section.

Comments or questions? Send an e-mail to editor@wsd.wline.se.

Last updated 13 October 1996